// 应收费用
import type { ProColumns } from '@ant-design/pro-components';

export const ReceiveOptions = [
  {key: 'freight', name: '运费', value: 0.0, label: '运费'},
  {key: 'boxing', name: '提箱费', value: 0.0, label: '提箱费'},
  {key: 'pre_arrival', name: '进港费', value: 0.0, label: '进港费'},
  {key: 'barcode', name: '条码费', value: 0.0, label: '条码费'},
  {key: 'pre_delivery', name: '预提费', value: 0.0, label: '预提费'},
  {key: 'over_weight', name: '超重费', value: 0, label: '超重费'},
  {key: 'other', name: '其它费', value: 0.0, label: '其它费'},
  {key: 'two_place', name: '两地装', value: 0.0, label: '两地装'},
  {key: 'two_place_delivery', name: '吊机费', value: 0.0, label: '吊机费'},
  {key: 'lift_fee', name: '落箱费', value: 0.0, label: '落箱费'},
  {
    key: 'taxes',
    name: '税金',
    value: 0.0,
    label: '税金',
    type: -1,
    color: '#fb6c5d',
  },
  {
    key: 'agent_fee',
    name: '代收费',
    value: 0.0,
    label: '代收费',
    type: -1,
    color: '#fb6c5d',
  },

  {key: 'seal_fee', name: '加封费', value: 0, label: '加封费', show: false},
  {
    key: 'customs_fee',
    name: '截关费',
    value: 0,
    label: '截关费',
    show: false,
  },
  {key: 'wash_fee', name: '洗箱费', value: 0, label: '洗箱费', show: false},
  {key: 'repair_fee', name: '修箱费', value: 0, label: '修箱费', show: false},
  {
    key: 'pre_arrival_fee',
    name: '预进港费',
    value: 0,
    label: '预进港费',
    show: false,
  },
];

// 应付费用
export const DealOptions = [
  {key: 'freight', name: '运费', value: 0, label: '运费'},
  {key: 'boxing', name: '提箱费', value: 0, label: '提箱费'},
  {key: 'pre_arrival', name: '进港费', value: 0, label: '进港费'},
  {key: 'barcode', name: '条码费', value: 0, label: '条码费'},
  {key: 'pre_delivery', name: '预提费', value: 0, label: '预提费'},
  {key: 'over_weight', name: '超重费', value: 0, label: '超重费'},
  {key: 'other', name: '其它费', value: 0, label: '其它费'},
  {key: 'two_place', name: '两地装', value: 0, label: '两地装'},
  {key: 'two_place_delivery', name: '落箱费', value: 0, label: '落箱费'},
  {
    key: 'agent_fee',
    name: '代收费',
    value: 0,
    label: '代收费',
    type: -1,
    color: '#fb6c5d',
  },
  {
    key: 'lift_fee',
    name: '吊机费',
    value: 0,
    label: '吊机费',
    type: -1,
    color: '#fb6c5d',
  },
  {
    key: 'taxes',
    name: '税金',
    value: 0,
    label: '税金',
    type: -2,
    color: '#f88612',
  },

  {key: 'seal_fee', name: '加封费', value: 0, label: '加封费', show: false},
  {
    key: 'customs_fee',
    name: '截关费',
    value: 0,
    label: '截关费',
    show: false,
  },
  {key: 'wash_fee', name: '洗箱费', value: 0, label: '洗箱费', show: false},
  {key: 'repair_fee', name: '修箱费', value: 0, label: '修箱费', show: false},
  {
    key: 'pre_arrival_fee',
    name: '预进港费',
    value: 0,
    label: '预进港费',
    show: false,
  },
];

//车辆费用
export const CarOptions = [
  {key: 'freight', name: '其它费', value: 0, label: '其它费'},
  {key: 'two_place', name: '提成', value: 0, label: '提成'},
  {key: 'road_bridge_fee', name: '路桥费', value: 0, label: '路桥费'},
  {key: 'oil_fee', name: '油费', value: 0, label: '油费'},
  {key: 'repair_fee', name: '修理费', value: 0, label: '修理费'},
  {key: 'boxing', name: '提箱费', value: 0, label: '提箱费'},
  {key: 'over_weight', name: '过磅费', value: 0, label: '过磅费'},
  {key: 'pre_delivery', name: '预录费', value: 0, label: '预录费'},
  {
    key: 'two_place_delivery',
    name: '代收费',
    value: 0,
    label: '代收费',
    type: -1,
    color: '#fb6c5d',
  },
  {key: 'wait_time', name: '待时费', value: 0, label: '待时费', show: false},
  {key: 'tyre_fee', name: '轮胎费', value: 0, label: '轮胎费', show: false},
  {
    key: 'parking_fee',
    name: '停车费',
    value: 0,
    label: '停车费',
    show: false,
  },
];

// 成本费用
export const CostOptions = [
  {key: 'taxes', name: '税金', value: 0, label: '税金'},
  {key: 'commission', name: '佣金', value: 0, label: '佣金'},
  {key: 'expenses', name: '快递费', value: 0, label: '快递费'},
  {key: 'office_expenses', name: '办公费', value: 0, label: '办公费'},
  {key: 'fine', name: '罚款', value: 0, label: '罚款'},
];

export const ColumnMap: { [key: string]: ProColumns } = {
  serialNumber: {
    title: '序列号',
    dataIndex: 'serialNumber',
    fixed: 'left',
    sorter: true,
    minWidth: 80,
  },
  status: {
    title: '当前状态',
    dataIndex: 'status',
    fixed: 'left',
    width: 140,
    hideInSearch: true,
    sorter: true,
    valueEnum: {
      '0': {text: '待处理', status: 'Default'},
      '1': {text: '接单', status: 'Processing'},
      '2': {text: '已派车', status: 'Success'},
      '3': {text: '处理失败', status: 'Error'},
    },
  },
  stuffingTime: {
    title: '做箱时间',
    dataIndex: 'stuffingTime',
    valueType: 'date',
    sorter: true,
    width: 120,
  },
  shippingLine: {
    title: '船公司',
    dataIndex: 'shippingLine',
    width: 120,
    sorter: true,
  },
  customerCode: {
    title: '客户简称',
    dataIndex: 'customerCode',
    width: 120,
    sorter: true,
  },
  address: {
    title: '拆/装箱地址',
    dataIndex: 'address',
    width: 150,
    ellipsis: true,
    sorter: true,
  },
  location: {
    title: '拆/装箱地点',
    dataIndex: 'location',
    width: 120,
    ellipsis: true,
    sorter: true,
  },
  vesselName: {
    title: '船名',
    dataIndex: 'vesselName',
    sorter: true,
    width: 120,
  },
  orderDate: {
    title: '接单日期',
    dataIndex: 'orderDate',
    valueType: 'date',
    hidden: true,
    sorter: true,
    width: 120,
  },
  voyage: {
    title: '航次',
    dataIndex: 'voyage',
    sorter: true,
    width: 80,
  },
  transitPort: {
    title: '中转港',
    dataIndex: 'transitPort',
    hidden: true,
    sorter: true,
    width: 80,
  },
  containerType: {
    title: '箱型',
    dataIndex: 'containerType',
    sorter: true,
    width: 80,
  },
  portOpen: {
    title: '开港时间',
    dataIndex: 'portOpen',
    valueType: 'dateTime',
    width: 160,
    sorter: true,
  },
  portCutoff: {
    title: '截港时间',
    dataIndex: 'portCutoff',
    valueType: 'dateTime',
    width: 160,
    sorter: true,
  },
  billNumber: {
    title: '提单号',
    dataIndex: 'billNumber',
    sorter: true,
    width: 120,
  },
  pickupYard: {
    title: '提箱场站',
    dataIndex: 'pickupYard',
    sorter: true,
    width: 160,
  },
  customerPickupYard: {
    title: '客户提箱场站',
    dataIndex: 'customerPickupYard',
    width: 200,
    sorter: true,
  },
  returnYard: {
    title: '还箱场站',
    dataIndex: 'returnYard',
    sorter: true,
    width: 120,
  },
  containerNumber: {
    title: '箱号',
    dataIndex: 'containerNumber',
    sorter: true,
    width: 120,
  },
  sealNumber: {
    title: '封条号',
    dataIndex: 'sealNumber',
    sorter: true,
    width: 120,
  },
  driverName: {
    title: '司机',
    dataIndex: 'driverName',
    sorter: true,
    width: 120,
  },
  driverPhone: {
    title: '司机手机',
    dataIndex: 'driverPhone',
    sorter: true,
    width: 120,
  },
  consignmentNote: {
    title: '托运单备注',
    dataIndex: 'consignmentNote',
    width: 140,
    ellipsis: true,
    sorter: true,
  },
  licensePlate: {
    title: '车牌号',
    dataIndex: 'licensePlate',
    sorter: true,
    width: 120,
  },
  contractNumber: {
    title: '合同号',
    dataIndex: 'contractNumber',
    sorter: true,
    width: 120,
  },
  remarks: {
    title: '大表备注',
    dataIndex: 'remarks',
    hidden: true,
    search: false,
    width: 120,
  },
  createdTime: {
    title: '创建时间',
    dataIndex: 'createdTime',
    valueType: 'date',
    sorter: true,
    width: 120,
  },
};
